import {request} from '../utils/util'

//设置默认地址
export function setDefault(param) {
  return request({
    url: 'ecapi.consignee.setDefault',
    method: 'POST',
    data: param
  })
}
//新增地址
export function addAdd(param) {
  return request({
    url: 'ecapi.consignee.add',
    method: 'POST',
    data: param
  })
}
//编辑地址
export function updateAdd(param) {
  return request({
    url: 'ecapi.consignee.update',
    method: 'POST',
    data: param
  })
}
//地址列表
export function getAdd(param) {
  return request({
    url: 'ecapi.consignee.list',
    method: 'POST',
    data: param
  })
}
//获取省市区
export function getRegion(param) {
  return request({
    url: 'ecapi.region.list',
    method: 'POST',
    data: param
  })
}
//优惠券
//{page: 1, per_page: "10", status: "0"}
export function getCashgift(param) {
  return request({
    url: 'ecapi.cashgift.list',
    method: 'POST',
    data: param
  })
}
//订单
//{page: 1, per_page: 10, status: "0"}
export function getOrder(param) {
  return request({
    url: 'ecapi.order.list',
    method: 'POST',
    data: param
  })
}
//金币
export function getCoin(param) {
  return request({
    url: 'ecapi.balance.get',
    method: 'POST',
    data: param
  })
}
//收藏
//{page: 1, per_page: 10}
export function getFavor(param) {
  return request({
    url: 'ecapi.product.liked.list',
    method: 'POST',
    data: param
  })
}

